import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios' // 导入axios
// import echarts from 'echarts' // 导入echarts
// import '../public/static/theme/chalk' // 导入echarts主题文件 --> 后改为index.html引入
import ElementUI from 'element-ui' // 导入element-ui
import 'element-ui/lib/theme-chalk/index.css' // 导入element-ui的css
import './assets/font/iconfont.css' // 导入icon图标
import './assets/font2/iconfont.css' // 导入icon图标
import './assets/css/global.less'// 导入全局样式
import outIcon from './assets/img/icon1.png'
import outLightIcon from './assets/img/iconLight1.png'
import inIcon from './assets/img/icon2.png'
import inLightIcon from './assets/img/iconLight2.png'
import SocketService from '@/utils/socket_service' // 导入websocket方法

// 对服务端进行websocket的连接
SocketService.Instance.connect()

// 将socket挂载到Vue实例上
Vue.prototype.$socket = SocketService.Instance
Vue.prototype.outIcon = outIcon
Vue.prototype.outLightIcon = outLightIcon
Vue.prototype.inIcon = inIcon
Vue.prototype.inLightIcon = inLightIcon

Vue.use(ElementUI) // 使用element

// 将echarts挂载到Vue原型对象上
Vue.prototype.$echarts = window.echarts

// 请求基准路径的配置
axios.defaults.baseURL = 'http://39.99.159.195:8082/api/' // 后端接口地址

// 测试test分支

// 将axios挂载到Vue的原型对象上
Vue.prototype.$http = axios

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
